﻿<Window 
    x:Class="BindingOriented.SyncLinq.Debugging.QueryVisualizerWindow"
    x:Name="_this"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase"
    xmlns:nodes="clr-namespace:BindingOriented.SyncLinq.Debugging.Model.Nodes"
    Title="SyncLINQ Query Visualizer" Width="667" Height="416" 
    WindowState="Maximized"
    >
    <Window.Resources>
        
        <HierarchicalDataTemplate ItemsSource="{Binding Path=ChildNodes}" DataType="{x:Type nodes:IteratorQueryNode}">
            <Button>
                Hello!
            </Button>
        </HierarchicalDataTemplate>
        
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="2*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        
        <!-- 
        The treeview that shows the query
        -->
        <TreeView 
            Grid.Column="0" 
            Grid.ColumnSpan="7" 
            Grid.Row="0" 
            ItemsSource="{Binding ElementName=_this, 
                          Path=Query,
                          diagnostics:PresentationTraceSources.TraceLevel=High}"
            />
        
        <GridSplitter HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Row="1" Height="10" Grid.ColumnSpan="7" />
        
        <!-- 
        This panel shows information about the query node
        -->
        <DockPanel Grid.Column="0" Grid.Row="2">
            <Label DockPanel.Dock="Top">Information</Label>
            <ListBox />
        </DockPanel>
        <GridSplitter HorizontalAlignment="Center" VerticalAlignment="Stretch" Grid.Column="1" Grid.Row="2" Width="10" />
        
        <!-- 
        This panel shows all items in the query node
        -->
        <DockPanel Grid.Column="2" Grid.Row="2">
            <Label DockPanel.Dock="Top">Items</Label>
            <ListBox />
        </DockPanel>
        <GridSplitter Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Stretch" Grid.Column="3" Width="10" />
        
        <!-- 
        This panel shows events raised by the query node 
        -->
        <DockPanel Grid.Column="4" Grid.Row="2">
            <Label DockPanel.Dock="Top">Events</Label>
            <ListBox />
        </DockPanel>
        <GridSplitter Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Stretch" Grid.Column="5" Width="10" />

        <!-- 
        This panel shows all dependencies in the query node 
        -->
        <DockPanel Grid.Column="6" Grid.Row="2">
            <Label DockPanel.Dock="Top">Dependencies</Label>
            <ListBox />
        </DockPanel>

        <GridSplitter HorizontalAlignment="Stretch" VerticalAlignment="Center" Height="10" Grid.ColumnSpan="7" Grid.Row="3" />
        
        <!-- 
        This panel contains the output window
        -->
        <Border Grid.Column="0" Grid.ColumnSpan="7" Grid.Row="4">
            <TextBox Text="" IsReadOnly="True" />
        </Border>
    </Grid>
</Window>
